#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'tian'
__data__ = '2022/1/18 15:44'
# software: PyCharm

from apps.app01 import models


class ApiModelData:
    """
    用例表对象和用例表中所有测试用例数据
    """

    def __init__(self):
        self.api_obj = models.Api.objects.all()

    @property
    def get_all_test_case(self):
        """
        数据库用例表中所有测试用例
        :return: 列表中嵌套字典，字典字段名为Key,字段值为value值
        """
        return self.api_obj.values()



if __name__ == '__main__':
    api_obj = ApiModelData()
    print(api_obj.get_all_test_case)
